﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Hydra.Shell.Attributes;
using Hydra.Shell.Enumerations;

namespace Hydra.Shell.Interfaces
{
    [GuidAttribute("35299EEC-11EE-4518-9F08-401638D1D3BC")]
    public interface IHydraUIShellOpenDocument : IUnknown
    {
        bool IsDocumentOpen(IHydraUIHierarchy pHierCaller, uint itemidCaller, string pszMkDocument, ref Guid rguidLogicalView, uint grfIDO, out IHydraUIHierarchy ppHierOpen, uint[] pitemidOpen, out IHydraWindowFrame ppWindowFrame, out int pfOpen);
        bool IsDocumentInAProject(string pszMkDocument, out IHydraUIHierarchy ppUIH, out uint pitemid, out IQueryServiceProvider ppSP, out int pDocInProj);
        bool OpenDocumentViaProject(string pszMkDocument, ref Guid rguidLogicalView, out IQueryServiceProvider ppSP, out IHydraUIHierarchy ppHier, out uint pitemid, out IHydraWindowFrame ppWindowFrame);
        bool OpenStandardEditor(HydraOpenStandardEditorFlags grfOpenStandard, string pszMkDocument, ref Guid rguidLogicalView, string pszOwnerCaption, IHydraUIHierarchy pHier, uint itemid, IUnknown punkDocDataExisting, IQueryServiceProvider psp, out IHydraWindowFrame ppWindowFrame);
        bool OpenStandardPreviewer(uint ospOpenDocPreviewer, string pszURL, PreviewResolution resolution, uint dwReserved);
        bool GetStandardEditorFactory(uint dwReserved, ref Guid pguidEditorType, string pszMkDocument, ref Guid rguidLogicalView, out string pbstrPhysicalView, out IHydraEditorFactory ppEF);
        bool MapLogicalView(ref Guid rguidEditorType, ref Guid rguidLogicalView, out string pbstrPhysicalView);
        bool OpenSpecificEditor(uint grfOpenSpecific, string pszMkDocument, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, string pszOwnerCaption, IHydraUIHierarchy pHier, uint itemid, IUnknown punkDocDataExisting, IQueryServiceProvider pSPHierContext, out IHydraWindowFrame ppWindowFrame);
        bool InitializeEditorInstance(uint grfIEI, IntPtr punkDocView, IUnknown punkDocData, string pszMkDocument, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, string pszOwnerCaption, string pszEditorCaption, IHydraUIHierarchy pHier, uint itemid, IUnknown punkDocDataExisting, IQueryServiceProvider pSPHierContext, ref Guid rguidCmdUI, out IHydraWindowFrame ppWindowFrame);
        bool IsSpecificDocumentViewOpen(IHydraUIHierarchy pHierCaller, uint itemidCaller, string pszMkDocument, ref Guid rguidEditorType, string pszPhysicalView, uint grfIDO, out IHydraUIHierarchy ppHierOpen, out uint pitemidOpen, out IHydraWindowFrame ppWindowFrame, out int pfOpen);
        bool OpenDocumentViaProjectWithSpecific(string pszMkDocument, uint grfEditorFlags, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, out IQueryServiceProvider ppSP, out IHydraUIHierarchy ppHier, out uint pitemid, out IHydraWindowFrame ppWindowFrame);
        bool OpenCopyOfStandardEditor(IHydraWindowFrame pWindowFrame, ref Guid rguidLogicalView, out IHydraWindowFrame ppNewWindowFrame);
        bool GetFirstDefaultPreviewer(out string pbstrDefBrowserPath, out int pfIsInternalBrowser, out int pfIsSystemBrowser);
        bool SearchProjectsForRelativePath(uint grfRPS, string pszRelPath, string[] pbstrAbsPath);
        bool AddStandardPreviewer(string pszExePath, string pszDisplayName, int fUseDDE, string pszDDEService, string pszDDETopicOpenURL, string pszDDEItemOpenURL, string pszDDETopicActivate, string pszDDEItemActivate, uint aspAddPreviewerFlags);
    }
}
